package builder;

public class Computer {
    private Processor processor;
    private Memory memory;
    private HardDisk hardDisk;

    public void setProcessor(Processor processor) {
        this.processor = processor;
    }

    public void setMemory(Memory memory) {
        this.memory = memory;
    }

    public void setHardDisk(HardDisk hardDisk) {
        this.hardDisk = hardDisk;
    }

    @Override
    public String toString() {
        return "Computer{" +
                "processor=" + processor.getType() +
                ", memory=" + memory.getSize() +
                ", hardDisk=" + hardDisk.getCapacity() +
                '}';
    }
}
